import { createStore, applyMiddleware } from "redux";
import reducers, { initState } from "./reducers";
import thunk from "redux-thunk";
import { composeWithDevTools } from "redux-devtools-extension";
const enhancers =
  process.env.NODE_ENV === "development"
    ? composeWithDevTools(
        applyMiddleware(thunk)
        // other store enhancers if any
      )
    : applyMiddleware(thunk);

let store = createStore(reducers, initState, enhancers);
export default store;
